
use "/Users/zerenli1992/Dropbox/political_risk/replication_files/pc_df_2022test" ,clear

run "/Users/zerenli1992/Dropbox/political_risk/replication_files/data_pre_process"

******************************************
* Figure H: Marginal Effect Analysis******
******************************************

*H1 purge kernel estimation estimate

interflex roa pc_dummy purge_l purge_dummy ${covariates}  , /// 
 type(kernel) fe(symbol year) cl(symbol) bw(1) ///
 ylab(ROA) dlab("RD Recruitment") xlab("Purge (logged)") 
 
 
graph save purge.gph ,replace


*H2 market development estimate

interflex roa pc_dummy mkt_index  ${covariates} /// 
, type(kernel) sav(fig1) fe(symbol year) cl(symbol) vce(cluster) bw(2) ///
 ylab(ROA) dlab(RD Recruitment) xlab(Market Development Index) 

graph save mkt.gph ,replace


gr combine   purge.gph mkt.gph , hole(2) ysize(8)


graph export "/Users/zerenli1992/Dropbox/Apps/Overleaf/cost_revolving_door_2020/het_combine.png",replace


************************************
* Figure 7 Kernel Estimation for Comparison
* of Outcomes Before and During the Campaign
************************************
use "/Users/zerenli1992/Dropbox/political_risk/replication_files/pc_df_2022test" ,clear


interflex roa pc_dummy year ${covariates} , ///  
 type(kernel) sav(fig1) fe(symbol year) cl(symbol) ///
 ylab(ROA) dlab(RD Rerecruitment) xlab(Year) bw(1)
 
graph export "/Users/zerenli1992/Dropbox/Apps/Overleaf/cost_revolving_door_2020/prepost_kernel.png",replace

 
 
 